#include <iostream>
using namespace std;

typedef struct _tree_node {
	int value;
	struct _tree_node* left;
	struct _tree_node* right;

	_tree_node(int val) {
		value = val;
		left = NULL;
		right = NULL;
	}
}tree_node;

//tree_node* get_tree() {
//	tree_node* r0 = new tree_node(0);
//	tree_node* r1 = new tree_node(1);
//	tree_node* r2 = new tree_node(2);
//	tree_node* r3 = new tree_node(3);
//	tree_node* r4 = new tree_node(4);
//	tree_node* r5 = new tree_node(5);
//
//	r0->left = r1;
//	r0->right = r2;
//	r1->left = r3;
//	r1->right = r4;
//	r2->right = r5;
//
//	return r0;
//}
//
//tree_node* mirror_tree(tree_node* root) {
//	if (root==NULL || (root->left==NULL&&root->right==NULL))
//		return root;
//
//	tree_node* left = mirror_tree(root->left);
//	tree_node* right = mirror_tree(root->right);
//
//	root->left = right;
//	root->right = left;
//
//	return root;
//}

//int main() {
//	tree_node* root = get_tree();
//	tree_node* rroot = mirror_tree(root);
//	return 0;
//}